package com.xxgc.ssm.po;

import java.util.ArrayList;
import java.util.List;

public class OrderForGoodsExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public OrderForGoodsExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andOfgIdIsNull() {
            addCriterion("ofg_id is null");
            return (Criteria) this;
        }

        public Criteria andOfgIdIsNotNull() {
            addCriterion("ofg_id is not null");
            return (Criteria) this;
        }

        public Criteria andOfgIdEqualTo(Long value) {
            addCriterion("ofg_id =", value, "ofgId");
            return (Criteria) this;
        }

        public Criteria andOfgIdNotEqualTo(Long value) {
            addCriterion("ofg_id <>", value, "ofgId");
            return (Criteria) this;
        }

        public Criteria andOfgIdGreaterThan(Long value) {
            addCriterion("ofg_id >", value, "ofgId");
            return (Criteria) this;
        }

        public Criteria andOfgIdGreaterThanOrEqualTo(Long value) {
            addCriterion("ofg_id >=", value, "ofgId");
            return (Criteria) this;
        }

        public Criteria andOfgIdLessThan(Long value) {
            addCriterion("ofg_id <", value, "ofgId");
            return (Criteria) this;
        }

        public Criteria andOfgIdLessThanOrEqualTo(Long value) {
            addCriterion("ofg_id <=", value, "ofgId");
            return (Criteria) this;
        }

        public Criteria andOfgIdIn(List<Long> values) {
            addCriterion("ofg_id in", values, "ofgId");
            return (Criteria) this;
        }

        public Criteria andOfgIdNotIn(List<Long> values) {
            addCriterion("ofg_id not in", values, "ofgId");
            return (Criteria) this;
        }

        public Criteria andOfgIdBetween(Long value1, Long value2) {
            addCriterion("ofg_id between", value1, value2, "ofgId");
            return (Criteria) this;
        }

        public Criteria andOfgIdNotBetween(Long value1, Long value2) {
            addCriterion("ofg_id not between", value1, value2, "ofgId");
            return (Criteria) this;
        }

        public Criteria andOfgGoodsIdIsNull() {
            addCriterion("ofg_goods_id is null");
            return (Criteria) this;
        }

        public Criteria andOfgGoodsIdIsNotNull() {
            addCriterion("ofg_goods_id is not null");
            return (Criteria) this;
        }

        public Criteria andOfgGoodsIdEqualTo(Long value) {
            addCriterion("ofg_goods_id =", value, "ofgGoodsId");
            return (Criteria) this;
        }

        public Criteria andOfgGoodsIdNotEqualTo(Long value) {
            addCriterion("ofg_goods_id <>", value, "ofgGoodsId");
            return (Criteria) this;
        }

        public Criteria andOfgGoodsIdGreaterThan(Long value) {
            addCriterion("ofg_goods_id >", value, "ofgGoodsId");
            return (Criteria) this;
        }

        public Criteria andOfgGoodsIdGreaterThanOrEqualTo(Long value) {
            addCriterion("ofg_goods_id >=", value, "ofgGoodsId");
            return (Criteria) this;
        }

        public Criteria andOfgGoodsIdLessThan(Long value) {
            addCriterion("ofg_goods_id <", value, "ofgGoodsId");
            return (Criteria) this;
        }

        public Criteria andOfgGoodsIdLessThanOrEqualTo(Long value) {
            addCriterion("ofg_goods_id <=", value, "ofgGoodsId");
            return (Criteria) this;
        }

        public Criteria andOfgGoodsIdIn(List<Long> values) {
            addCriterion("ofg_goods_id in", values, "ofgGoodsId");
            return (Criteria) this;
        }

        public Criteria andOfgGoodsIdNotIn(List<Long> values) {
            addCriterion("ofg_goods_id not in", values, "ofgGoodsId");
            return (Criteria) this;
        }

        public Criteria andOfgGoodsIdBetween(Long value1, Long value2) {
            addCriterion("ofg_goods_id between", value1, value2, "ofgGoodsId");
            return (Criteria) this;
        }

        public Criteria andOfgGoodsIdNotBetween(Long value1, Long value2) {
            addCriterion("ofg_goods_id not between", value1, value2, "ofgGoodsId");
            return (Criteria) this;
        }

        public Criteria andOfgNumberIsNull() {
            addCriterion("ofg_number is null");
            return (Criteria) this;
        }

        public Criteria andOfgNumberIsNotNull() {
            addCriterion("ofg_number is not null");
            return (Criteria) this;
        }

        public Criteria andOfgNumberEqualTo(Integer value) {
            addCriterion("ofg_number =", value, "ofgNumber");
            return (Criteria) this;
        }

        public Criteria andOfgNumberNotEqualTo(Integer value) {
            addCriterion("ofg_number <>", value, "ofgNumber");
            return (Criteria) this;
        }

        public Criteria andOfgNumberGreaterThan(Integer value) {
            addCriterion("ofg_number >", value, "ofgNumber");
            return (Criteria) this;
        }

        public Criteria andOfgNumberGreaterThanOrEqualTo(Integer value) {
            addCriterion("ofg_number >=", value, "ofgNumber");
            return (Criteria) this;
        }

        public Criteria andOfgNumberLessThan(Integer value) {
            addCriterion("ofg_number <", value, "ofgNumber");
            return (Criteria) this;
        }

        public Criteria andOfgNumberLessThanOrEqualTo(Integer value) {
            addCriterion("ofg_number <=", value, "ofgNumber");
            return (Criteria) this;
        }

        public Criteria andOfgNumberIn(List<Integer> values) {
            addCriterion("ofg_number in", values, "ofgNumber");
            return (Criteria) this;
        }

        public Criteria andOfgNumberNotIn(List<Integer> values) {
            addCriterion("ofg_number not in", values, "ofgNumber");
            return (Criteria) this;
        }

        public Criteria andOfgNumberBetween(Integer value1, Integer value2) {
            addCriterion("ofg_number between", value1, value2, "ofgNumber");
            return (Criteria) this;
        }

        public Criteria andOfgNumberNotBetween(Integer value1, Integer value2) {
            addCriterion("ofg_number not between", value1, value2, "ofgNumber");
            return (Criteria) this;
        }

        public Criteria andOfgOrderIdIsNull() {
            addCriterion("ofg_order_id is null");
            return (Criteria) this;
        }

        public Criteria andOfgOrderIdIsNotNull() {
            addCriterion("ofg_order_id is not null");
            return (Criteria) this;
        }

        public Criteria andOfgOrderIdEqualTo(Long value) {
            addCriterion("ofg_order_id =", value, "ofgOrderId");
            return (Criteria) this;
        }

        public Criteria andOfgOrderIdNotEqualTo(Long value) {
            addCriterion("ofg_order_id <>", value, "ofgOrderId");
            return (Criteria) this;
        }

        public Criteria andOfgOrderIdGreaterThan(Long value) {
            addCriterion("ofg_order_id >", value, "ofgOrderId");
            return (Criteria) this;
        }

        public Criteria andOfgOrderIdGreaterThanOrEqualTo(Long value) {
            addCriterion("ofg_order_id >=", value, "ofgOrderId");
            return (Criteria) this;
        }

        public Criteria andOfgOrderIdLessThan(Long value) {
            addCriterion("ofg_order_id <", value, "ofgOrderId");
            return (Criteria) this;
        }

        public Criteria andOfgOrderIdLessThanOrEqualTo(Long value) {
            addCriterion("ofg_order_id <=", value, "ofgOrderId");
            return (Criteria) this;
        }

        public Criteria andOfgOrderIdIn(List<Long> values) {
            addCriterion("ofg_order_id in", values, "ofgOrderId");
            return (Criteria) this;
        }

        public Criteria andOfgOrderIdNotIn(List<Long> values) {
            addCriterion("ofg_order_id not in", values, "ofgOrderId");
            return (Criteria) this;
        }

        public Criteria andOfgOrderIdBetween(Long value1, Long value2) {
            addCriterion("ofg_order_id between", value1, value2, "ofgOrderId");
            return (Criteria) this;
        }

        public Criteria andOfgOrderIdNotBetween(Long value1, Long value2) {
            addCriterion("ofg_order_id not between", value1, value2, "ofgOrderId");
            return (Criteria) this;
        }

        public Criteria andOfgValidIsNull() {
            addCriterion("ofg_valid is null");
            return (Criteria) this;
        }

        public Criteria andOfgValidIsNotNull() {
            addCriterion("ofg_valid is not null");
            return (Criteria) this;
        }

        public Criteria andOfgValidEqualTo(String value) {
            addCriterion("ofg_valid =", value, "ofgValid");
            return (Criteria) this;
        }

        public Criteria andOfgValidNotEqualTo(String value) {
            addCriterion("ofg_valid <>", value, "ofgValid");
            return (Criteria) this;
        }

        public Criteria andOfgValidGreaterThan(String value) {
            addCriterion("ofg_valid >", value, "ofgValid");
            return (Criteria) this;
        }

        public Criteria andOfgValidGreaterThanOrEqualTo(String value) {
            addCriterion("ofg_valid >=", value, "ofgValid");
            return (Criteria) this;
        }

        public Criteria andOfgValidLessThan(String value) {
            addCriterion("ofg_valid <", value, "ofgValid");
            return (Criteria) this;
        }

        public Criteria andOfgValidLessThanOrEqualTo(String value) {
            addCriterion("ofg_valid <=", value, "ofgValid");
            return (Criteria) this;
        }

        public Criteria andOfgValidLike(String value) {
            addCriterion("ofg_valid like", value, "ofgValid");
            return (Criteria) this;
        }

        public Criteria andOfgValidNotLike(String value) {
            addCriterion("ofg_valid not like", value, "ofgValid");
            return (Criteria) this;
        }

        public Criteria andOfgValidIn(List<String> values) {
            addCriterion("ofg_valid in", values, "ofgValid");
            return (Criteria) this;
        }

        public Criteria andOfgValidNotIn(List<String> values) {
            addCriterion("ofg_valid not in", values, "ofgValid");
            return (Criteria) this;
        }

        public Criteria andOfgValidBetween(String value1, String value2) {
            addCriterion("ofg_valid between", value1, value2, "ofgValid");
            return (Criteria) this;
        }

        public Criteria andOfgValidNotBetween(String value1, String value2) {
            addCriterion("ofg_valid not between", value1, value2, "ofgValid");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}